<html>
<head>
<link href="../../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>Topological Mapping (2/7)</h3></center>		  
		<center><img src="volumeMesh.png" width="300" name="TopologyTetra2TriangleTopologicalMapping" align="middle">
		</center>
		
		<br><div id="orangeText">Description</div>
		
        <p>In this step we load a tetrahedral mesh using a mesh file and dynamic topological components. For details concerning differences between static and dynamic topologies, refer to
		<a href="../../Topologies/TopologyLinearDifferentMesh.scn"> topological tutorials</a>. </p>

		<div id="orangeText">Key points</div>
        <p>        <ul>
		  <li>A <b>meshLoader</b> to read mesh file. (not necessary in regular mesh)</li>
		  <li>A <b>mechanicalObject</b> with geometry point positions.</li>
		  <li>Dynamic topological components to store the volume mesh.</li>
		</ul>
        </p>
		
        <div id="tutorialAction"><p>Add a new <strong>GNode</strong> to the <strong>root</strong> node. Rename it "Tetrahedrons Mesh".</p>
        
        <p>Add a <strong>MeshGmshLoader</strong> component to the <strong>Tetrahedrons Mesh</strong> node. Rename it "loader". Specify the <strong>Filename of the object</strong> to be <strong>/Sofa/share/mesh/cylinder.msh</strong>.</p>
        
        <p>Add a <strong>MechanicalObject</strong> component to the <strong>Tetrahedrons Mesh</strong> node. Rename it "Volume".</p>
        
        <p> Under the <strong>Transformations</strong> tab, press the <strong>Scale of the DOFs in 3 dimensions</strong> button. In the textbox that appears, enter "@loader.scale3d". Similarly, press the <strong>Translation of the DOFs</strong> button and enter "@loader.translation", and press the <strong>Rotation of the DOFs</strong> button and enter "@loader.rotation".</p>
        <p> Under the <strong>Vector 1/4</strong> tab, press the <strong>position coordinates of the degrees of freedom</strong> button. In the textbox that appears, enter "@loader.position". </p>
        <p>Add a <strong>TetrahedronSetTopologyContainer</strong> component to the <strong>Tetrahedrons Mesh</strong> node. Rename it "Container". Specify <strong>/Sofa/share/mesh/cylinder.msh</strong> as the <strong>Filename of the mesh</strong>. <strong>TetrahedronSetTopologyContainer</strong> is a topology container, it is used to store a topology (positions, edges, triangles, tetrahedrons). Usually this topology is not defined manually, but copied from the topology of  a MeshLoader component.</p>
        <p>In the <strong>Property 2/2</strong> tab, press the <strong>List of tetrahedron indices</strong> button. Enter "@loader.tetrahedra" in the textbox that appears. This syntax means that the Data "tetrahedra" contained in the SOFA Component of this node named "loader" must be copied into this Data. </p>
        <p>Add a <strong>TetrahedronSetGeometryAlgorithms</strong> component to the <strong>Tetrahedrons Mesh</strong> node. In the <strong>Visualization 2/2</strong> tab, check the <strong>if true, draw the tetahedra in the topology</strong> box</p>
        <p>Change the <strong>RGB code color used to draw tetrahedra</strong> property to (1 1 0.3).</p> </div>
        
        <p>The options in the TetrahedronSetGeometryAlgorithms component are used to display the topological element (tetrahedra here).</p>

		<div id="orangeText">Results</div>
		
        <p><div id="tutorialAction">Run in SOFA and animate.</div></p>
        
		<p>In this scene we only have the tetrahedral mesh in terms of topology and geometry. No interactions are possible at this step.</p>

                <br><center><h3><a href="0_TopoMapping.scn">Previous</a> ____________ <a href="2_TopoMapping.scn">Next</a></center></h3>
	</div>
</body>
</html>
